﻿using Conpany.Application.Main.Views;
using Conpany.Application.Share.prism;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Regions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Conpany.Application.Main
{
    public class ApplicationMainModel : IModule
    {
        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="containerProvider"></param>
        /// <exception cref="NotImplementedException"></exception>
        public void OnInitialized(IContainerProvider containerProvider)
        {
            containerProvider.Resolve<IRegionManager>().RegisterViewWithRegion<MainView>(RegionNames.MainRegion);
        }
        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="containerRegistry"></param>
        /// <exception cref="NotImplementedException"></exception>
        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<MainView>();
        }
    }
}
